home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / term / xlib.trm < prev   
Text File  |  1993-09-15  |  1KB  |  66 lines

  1. /*
  2.  * $Id: xlib.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  3.  */
  4.  
  5.  
  6. /*
  7.  * xlib.trm - inboard terminal driver for X11 (dumps gnuplot_x11 commands)
  8.  *
  9.  * To be used with gnulib_x11.
  10.  */
  11.  
  12. #define Xlib_XMAX 4096
  13. #define Xlib_YMAX 4096
  14.  
  15. /* approximations for typical font/screen sizes */
  16. #define Xlib_VCHAR (Xlib_YMAX/25) 
  17. #define Xlib_HCHAR (Xlib_XMAX/100) 
  18. #define Xlib_VTIC (Xlib_YMAX/100)
  19. #define Xlib_HTIC (Xlib_XMAX/150)
  20.  
  21. Xlib_init() { ; }
  22.  
  23. Xlib_graphics() { fprintf(outfile, "G\n"); }
  24.  
  25. Xlib_text()
  26.   fprintf(outfile, "E\n"); fflush(outfile);
  27. #ifdef ULTRIX_KLUDGE
  28.   fprintf(outfile, "E\n"); fflush(outfile);
  29. #endif
  30. }
  31.  
  32. Xlib_reset() { fprintf(outfile, "R\n"); fflush(outfile); }
  33.  
  34. Xlib_move(x,y)
  35.      unsigned int x,y;
  36. {
  37.   fprintf(outfile, "M%04d%04d\n", x, y);
  38. }
  39.  
  40. Xlib_vector(x,y)
  41.      unsigned int x,y;
  42. {
  43.   fprintf(outfile, "V%04d%04d\n", x, y);
  44. }
  45.  
  46. Xlib_linetype(lt)
  47.      int lt;
  48. {
  49.   fprintf(outfile, "L%04d\n", lt);
  50. }
  51.  
  52. Xlib_put_text(x,y,str)
  53.      unsigned int x,y;
  54.      char str[];
  55. {
  56.   fprintf(outfile, "T%04d%04d%s\n", x, y, str);
  57. }
  58.  
  59. Xlib_justify_text(mode)
  60.      enum JUSTIFY mode;
  61. {
  62.   fprintf(outfile, "J%04d\n", mode);
  63.   return(TRUE);
  64. }
  65.